home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir35
/
!tsgrep.zip
/
TSGREP.BAT
next >
Wrap
DOS Batch File
|
1993-05-04
|
2KB
|
51 lines
@echo off
rem Usage:
rem TSGREP string infile [options [outfile]]
if "%1"== "" goto :no2
if "%1"== "?" goto :help
if "%2"== "" goto :help
set STRING=%1
set infile=%2
set options=%3
set outfile=%4
set exclude=" .bak .$hp"
:no2
e tsgrep.tmp -eTSGREP
rem cls
goto end
:help
echo ┌──────────────────────────────────────────────────────────────────────┐
echo │ Usage: │
echo │ TSGREP [searchstring infile [options [outfile]]] │
echo ╞══════════════════════════════════════════════════════════════════════╡
echo │ If no arguments given, TSGREP prompts for each one. │
echo │ Searchstring may be any QEdit searchstring. │
echo │ * Use -OR- instead of as the 'OR' indicator in expressions │
echo │ * Use -OR- instead of as the 'OR' indicator in expressions │
echo │ * Braces optional; default parsing supplied │
echo │ * Use \- instead of = │
echo │ * Use _ instead of space │
echo │ Infile may be any valid filespec, wildcards included. │
echo │ Files with '@' in the name are treated as list files. │
echo │ Add + to the end of the filesspec for recursivce search. │
echo │ List files may be nested to 3 levels; possibly more will work. │
echo │ Use ^ as a separator for multiple filespecs. │
echo │ Options may be any QEdit search options except 'b'. │
echo │ * An additional TSGREP option is 'e', 'edit the outfile'. │
echo │ * Default options = 'ei'' │
echo │ * if only 'e' entered, options set to 'ei' │
echo │ * Use \# in options for suppress line numbers │
echo │ * Use 1 in options to stop searching each file after 1 hit │
echo │ Outfile is optional; default is TSGREP.TMP │
echo └──────────────────────────────────────────────────────────────────────┘
:end
set string=
set infile=
set outfile=
set options=
set exclude=